1. Field of the Invention
The present invention relates to a numerical controller provided with a program pre-reading function.
2. Description of the Related Art
In NC program pre-reading control, a numerical controller is commonly known which has a function for pre-reading a predetermined number of pre-read blocks (see Japanese Patent Application Laid-Open No. 2007-94936, Japanese Patent Application Laid-Open No. 2007-164509, and Japanese Patent Application Laid-Open No. 2008-40542).
Furthermore, apart from the NC program operation described above, a numerical controller is commonly known which has a function (path table operation function) whereby data in a table format (path table) specifying axis positions with reference to time, axis position or spindle position, is stored in a memory or a storage device connected via a network, and respective axes are driven by successively reading out the table format data (path table) (see Japanese Patent Application Laid-Open No. 59-177604 or Japanese Patent Application Laid-Open No. 2012-234445). By the path table operation function, it becomes possible to achieve free tool operation independently of the machining program, and therefore the machining time can be shortened and the machining accuracy can be raised.
Furthermore, Japanese Patent Application Laid-Open No. 2012-93975 discloses a method and a device for predicting a machining time in a numerically-controlled machine tool which can improve the prediction accuracy of the machining time and shorten the calculation time for predicting the machining time.
With the NC program pre-reading control described above, in the case of an NC program which involves continuous small blocks, the pre-reading may not performed in time. If the pre-reading of any one NC program of a plurality of NC programs which are operating in coordinated fashion is not performed in time, then this affects the other NC programs as well, and the overall cycle time is lengthened.
Here, an example is described with reference to FIGS. 12 and 13 in which the overall cycle time becomes longer.
FIG. 12 is a diagram showing examples of three programs which are executed mutually in parallel by pre-reading in NC program operation. FIG. 13 is a diagram showing the integrated value of the execution times (the integrated execution time) of the pre-read blocks in each of the three programs shown in FIG. 12, at a stage where nine blocks have been pre-read, according to a conventional pre-reading control system.
An example is now described in which the three programs (O0001, O0002, O0003) shown in FIG. 12 are executed in parallel. “O0001”, “O0002” and “O0003” are the respective program names. The numerical value in parenthesis in each of the programs in FIG. 12 represents the execution time of each block.
Conventionally, pre-reading of the respective programs is carried out without taking account of the integrated value of the execution times of the pre-read blocks, and therefore when pre-reading is carried out on an average basis, the pre-reading has been performed in following sequence.
(1) N11 is pre-read
[Number of pre-read blocks (O0001, O0002, O0003)=(1, 0, 0)]
(2) N21 is pre-read
[Number of pre-read blocks (O0001, O0002, O0003)=(1, 1, 0)]
(3) N31 is pre-read
[Number of pre-read blocks (O0001, O0002, O0003)=(1, 1, 1)]
(4) N12 is pre-read
[Number of pre-read blocks (O0001, O0002, O0003)=(2, 1, 1)]
(5) N22 is pre-read
[Number of pre-read blocks (O0001, O0002, O0003)=(2, 2, 1)]
(6) N32 is pre-read
[Number of pre-read blocks (O0001, O0002, O0003)=(2, 2, 2)]
(7) N13 is pre-read
[Number of pre-read blocks (O0001, O0002, O0003)=(3, 2, 2)]
(8) N23 is pre-read
[Number of pre-read blocks (O0001, O0002, O0003)=(3, 3, 2)]
(9) N33 is pre-read
[Number of pre-read blocks (O0001, O0002, O0003)=(3, 3, 3)]
The integrated value of the execution times of the pre-read blocks in each program at the stage where nine blocks have been pre-read in the combination indicated in (9) above is as shown in FIG. 13. In this case, for program O0003, the integrated value of the execution times of the pre-read blocks is 3 ms, and therefore if operation is carried out in this state and the pre-reading is not performed in time, a wait occurs until the pre-reading is completed.
Furthermore, in the case of operation based on data in a table format (path table operation), if there is a continuation of small blocks, then there may be situations where the pre-reading of the blocks in each table format data is not performed in time. If pre-reading is not performed in time, then the device cannot be moved to the axis position in accordance with the reference time, the reference axis position or spindle position, and therefore an alarm or immediate axes stop is caused. When operating with table format data which has been modified in such a manner that pre-reading is performed in time, so as to avoid an alarm or immediate axes stop, the cycle time becomes longer.
Here, an example of a conventional technique for operation based on table format data (path table operation) while carrying out pre-reading of path tables is described, in which the three path tables shown in FIG. 14 (a path table <X> for the X axis, a path table <S> for the spindle S, and a path table <M> for an auxiliary function) are executed.
Conventionally, pre-reading is carried out without taking account of the integrated value of the execution times of the pre-read blocks, and therefore when pre-reading is carried out on an average basis, the pre-reading has been performed in following sequence.
(1) Pre-read L1 in <X>
[Number of pre-read blocks (<X>, <S>, <M>)=(1, 0, 0)]
(2) Pre-read L100 in <S>
[Number of pre-read blocks (<X>, <S>, <M>)=(1, 1, 0)]
(3) Pre-read L1000 in <M>
[Number of pre-read blocks (<X>, <S>, <M>)=(1, 1, 1)]
(4) Pre-read L2 in <X>
[Number of pre-read blocks (<X>, <S>, <M>)=(2, 1, 1)]
(5) Pre-read L150 in <S>
[Number of pre-read blocks (<X>, <S>, <M>)=(2, 2, 1)]
(6) Pre-read L1050 in <M>
[Number of pre-read blocks (<X>, <S>, <M>)=(2, 2, 2)]
(7) Pre-read L3 in <X>
[Number of pre-read blocks (<X>, <S>, <M>)=(3, 2, 2)]
(8) Pre-read L200 in <S>
[Number of pre-read blocks (<X>, <S>, <M>)=(3, 3, 2)]
(9) Pre-read L1100 in <M>
[Number of pre-read blocks (<X>, <S>, <M>)=(3, 3, 3)]:
The integrated value of the execution times of the pre-read blocks of each path table at the stage where nine blocks has been pre-read in the combination indicated in (9) above are as shown in FIG. 15. In this case, the integrated value of the execution times of the pre-read blocks in <X> is 3 ms. The pre-reading is not performed in time if operation is carried out in this state, and therefore an alarm or an immediate axes stop is caused. In the case of path table operation, the integrated value of the execution times of the pre-read blocks of each path table is not monitored. Therefore, it has not been possible to determine, in advance, that the integrated value of the execution times of the pre-read blocks is less than the time for safe deceleration and halting.
Consequently, if the pre-reading is not performed in time, then not only is an alarm or immediate axes stop caused, but as a result of this, there is possibility of causing shocks to the machine. In particular, when operating by carrying out pre-reading from a storage device which is connected to a network, there is a possibility of communications being cut off due to a temporary network problem, and therefore the resolution of this problem has become an issue.